<?php
namespace Home\Logic;

class PartnerProductLogic {
	
	/**
	 * 获得模型配置信息
	 */
	public function getModelConfig( $config ) {
		$customerProduct = M("CustomerProduct")->where("cid=%d", $config['cid'])->find();
		$config = M( "PartnerProduct" )->where("pid=%d", $config['pid'])->find();
		if ( $customerProduct ) {
			$customerProduct['theme'] and $config['theme'] =  $customerProduct['theme'];
			$customerProduct['theme_color'] and $config['theme_color'] =  $customerProduct['theme_color'];
		}
		$config['owner'] = 'Partner';
		return $config;
	}
	
	
}